package org.chuan.hisports.service.Imp;

import org.chuan.hisports.dao.FitnessUserDao;
import org.chuan.hisports.entity.FitnessAdmin;
import org.chuan.hisports.service.FitnessAdminService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.Map;

@Service
public class FitnessAdminServiceImp implements FitnessAdminService {
    @Autowired
    FitnessUserDao fitnessUserDao;

    @Override
    public FitnessAdmin login(String username, String password) {

        FitnessAdmin fitnessAdmin = fitnessUserDao.login(username,password);

        return fitnessAdmin;
    }

    @Override
    public Map<String,String> readMemcoa(String uid){
        Map<String,String> map = fitnessUserDao.selectmemcaoByUid(uid);
        return map;
    }

    @Override
    public void deleteMemcoa(String uid, String cid){
        fitnessUserDao.deleteMemcoa(uid, cid);
    }
    @Override
    public void insertMemcoa(String uid,String cid){
        fitnessUserDao.insertMemcoa(uid, cid);
    }
}
